<div class="ibox">
	<div class="ibox-content">
		<form class="form-horizontal" id="editForm" action="${cxt!}/cms/articleCatalog/update" method="POST">
			<input type="hidden" id="articleCatalogid" name="articleCatalog.id" value="${articleCatalog.id!}">
			<div class="form-group">
				<label for="namebasic" class="col-md-2 control-label">${_res["articleCatalog.classificationName"]}<span class="fontColorRed">&nbsp;*</span></label>
				<div class="col-md-3 ">
					<input type="text" class="form-control" name="articleCatalog.name" value="${articleCatalog.name!}"
						placeholder="${_res['articleCatalog.classificationName']}" required aria-required="true">
				</div>

				<label for="partentInputId" class="col-md-2 control-label">${_res["articleCatalog.superiorClassification"]}<span class="fontColorRed">&nbsp;*</span></label>
				<div class="col-md-3">
					<!-- 父菜单id，从modal中获取 -->
					<input type="text" class="form-control" id="partentMenuName" value="${articleCatalog.parentCatalog.name!}" 
					data-toggle="modal" data-target="#myModal"> 
					<input type="hidden" name="articleCatalog.parentid" id="parentMenuId" value="${articleCatalog.parentid!}" required aria-required="true" />
				</div>
			</div>
			<div class="hr-line-dashed"></div>

			<div class="form-group">
				<label class="col-sm-2 control-label">${_res["articleCatalog.status"]}<span class="fontColorRed">&nbsp;*</span></label>
				<div class="col-sm-3">
					<#dict type="select" name="articleCatalog.status" dictCode="COMMON_STATUS" value="${articleCatalog.status!}" required="true" />
				</div>

				<label for="namebasic" class="col-md-2 control-label">${_res["articleCatalog.sortValue"]}</label>
				<div class="col-md-3">
					<input type="text" class="form-control" name="articleCatalog.priority" value="${articleCatalog.priority!}"
						placeholder="${_res['articleCatalog.sortValue']}" number="true">
				</div>
			</div>
			<div class="hr-line-dashed"></div>

			<div class="form-group">
				<div class="row">
					<div class="col-md-10 col-md-offset-2">
						<% if(hasPrivilegeUrl("articleCatalogList")){ %>
						<button type="button" class="btn btn-warning" onClick="ajaxContent('/cms/articleCatalog/list')">${_res["system.return"]}</button>
						<% } %>
						 <% if(hasPrivilegeUrl("articleCatalogEdit")){ %>
						<button type="submit" class="btn btn-primary">${_res["system.save"]}</button>
						<% } %>
						 <% if(hasPrivilegeUrl("articleCatalogList")){ %>
						<button type="button" class="btn btn-danger" onClick="ajaxContent('/cms/articleCatalog/list')">${_res["system.cancel"]}</button>
						<% } %>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<#submit formId="editForm" divId="content" /> <#nav />

<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
	aria-labelledby="myModaLabel">
	<%include("selectPartentNode.html"){}%></div>
<script>
	$(document).ready(function() {
		//增加模拟框拖动效果
		$(".modal").draggable({
			handle : ".modal-header"
		});

		initParentMenu();
	});

	/*初始化父菜单值  当为根菜单时显示根菜单  */
	function initParentMenu() {
		var parentMenuId = $("#parentMenuId").val();
		if (0 == parentMenuId) {
			$("#partentMenuName").val("${_res['system.rootMenu']}");
		}
	}
</script>